<template>
	<view class="c-box">
		<view class="c-t">
			<view>{{value}}</view>
		</view>
		<view style="padding:0 50px 0 50px;margin-top: 10px;">
			<u-form :model="form" ref="uForm">
				<u-form-item label="当前状态:" label-width="200" prop="name">
					<text>支付成功</text>
				</u-form-item>
				<u-form-item label="支付时间:" label-width="200" prop="intro">
					<text>{{label}}</text>
				</u-form-item>
				<u-form-item label="套餐名称:" label-width="200" prop="intro">
					<text>{{title}}</text>
				</u-form-item>
				<u-form-item label="发送条数:" label-width="200" prop="intro" v-if="type == 1">
					<text>{{number}}条</text>
				</u-form-item>
				<u-form-item label="增加天数:" label-width="200" prop="intro" v-if="type == 2">
					<text>{{dayNumber}}天</text>
				</u-form-item>
			</u-form>


		</view>
	</view>
</template>

<script>
	export default {
		onLoad(obj) {
			console.log(obj)

			this.title = obj.title
			this.label = obj.label
			
			console.log(this.value.indexOf("."))
			if (this.value.indexOf(".") != -1) {
				this.value = "-" + obj.value.slice(1) + ".00"
			} else {
				this.value = "-" + obj.value
			}
			this.number = obj.number
			this.number = obj.number
			this.type = obj.type
			this.dayNumber = obj.dayNumber
		},
		data() {
			return {
				form: {},
				title: '',
				label: '',
				value: '',
				number: '',
				type: 0,
				dayNumber: ''
			}
		},
		methods: {

		}
	}
</script>

<style lang="scss" scoped>
	.c-box {
		background-color: white;
		height: 100vh;
	}

	.c-t {
		display: flex;
		height: 36vh;
		justify-content: center;
		align-items: center;
		font-size: 36px;
		font-weight: bold;
		border-bottom: 1px solid #ccc;
	}

	.c-item {
		display: flex;
		justify-content: space-around;
		margin-top: 10px;
		font-size: 16px;
	}
</style>